SSR Flow
Catalyst follows a predictable server-rendered flow: match the route, resolve route data, stream HTML, and then hydrate the same tree on the client. Understanding this lifecycle makes routing, data loading, and metadata behavior much easier to reason about.
Request -> Route Match -> serverFetcher -> HTML Render -> Response
|
v
Client Hydration -> Navigation -> clientFetcher
End-To-End Flow
- The Node server receives the request.
- Catalyst matches the URL against the route definitions.
- Route-level data is prepared for SSR.
- React renders the app shell and matched route on the server.
- HTML is streamed to the browser.
- The client hydrates the same tree and takes over navigation.
- Later route transitions fetch route data client-side without a full reload.
Role Of The App Shell
The app shell is the persistent layout around the active route. It typically owns:
- global providers
- top-level layout
- shared navigation
- the outlet where the matched route renders
Because the shell stays mounted across route transitions, only the route content swaps during client navigation.
Data Behavior Across SSR And Navigation
serverFetcherprepares the initial route payload during SSR.RouterDataProvidercarries that route data into hydration.clientFetcherruns on later client-side transitions and manual refresh flows.useCurrentRouteDatareads the current route state from that provider context.
What This Means For Teams
- If a page needs complete first-render content, put that logic in
serverFetcher. - Keep shell-level UI independent from route-specific data where possible.
- Do not rebuild the initial page request in
useEffect; that duplicates the SSR pipeline.